<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>生成器的使用</title>
</head>
<body>
    <script>
        function * generatorFn() {
            yield 'Cellophane'
            yield 'Zhou'
            yield 'Mercer'
            return 'Jiang'
        }
        let generatorObject = generatorFn()
        console.log(generatorObject.next())
        console.log(generatorObject.next())
        console.log(generatorObject.next())
        console.log(generatorObject.next())
        console.log(generatorObject.next())
        // 如何通过是哪
    </script>
</body>
</html>